﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="StudentFile.aspx.cs" Inherits="Credit_Teacher_Reprots_StudentFile" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../Common/css/main.css" rel="stylesheet" type="text/css" />
</head>
<body scroll="no">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
    </asp:ScriptManager>
    <div class="pageBody">
        <div class="mainWarp" style="height: 96%; padding-top: 5px; padding-left: 5px;">
            <table>
                <tr>
                    <td style="padding-left: 10px;">
                        <input type="button" class="commonBut" id="btnExport" value="导出Excel" onclick="getExcel()"
                            style="display: none;" />
                    </td>
                </tr>
            </table>
            <div style="overflow-y: auto; overflow-x: none; height: 98%;">

                <asp:UpdatePanel ID="upResult" runat="server">
                    <ContentTemplate>
                        <asp:Repeater ID="Repeater1" runat="server">
                            <HeaderTemplate>
                                <%=WriteContext() %>
                            </HeaderTemplate>
                            <ItemTemplate></ItemTemplate>
                            <FooterTemplate></FooterTemplate>
                        </asp:Repeater>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnBind" EventName="Click" />
                    </Triggers>
                </asp:UpdatePanel>
                <div style="display: none;">
                    <asp:Button ID="btnBind" runat="server" Text="btnBind" OnClick="btnBind_Click" />
                </div>
            </div>
        </div>
    </div>
    </form>
</body>
<script type="text/javascript" src="../../Common/js/TableForExport.js"></script>
<script type="text/javascript">
    function getExcel() {
        var cells = GetTableInfo(document.getElementById("tbResult"));
        if (cells != null) {
            var causeID = request("CauseID");
            if (causeID == "") causeID = -1;
            else causeID = parseInt(causeID);

            PageMethods.GetExcel(cells, causeID, function (result) {
                document.getElementById('downloadf').src = "";
                document.getElementById('downloadf').src = "../../../PostFileBytes.aspx";
            }, function (err) { alert(err._message); });
        }

    }
</script>
</html>
